home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Plotting / aa_Intel_Only / Gnuplot / GnuplotSource / ContourSeriesPane.m < prev    next >
Encoding:
Text File  |  1995-06-12  |  2.0 KB  |  106 lines

  1. /*
  2.  *  Copyright (C) 1993  Robert Davis
  3.  *
  4.  *  This program is free software; you can redistribute it and/or
  5.  *  modify it under the terms of Version 2, or any later version, of 
  6.  *  the GNU General Public License as published by the Free Software 
  7.  *  Foundation.
  8.  */
  9.  
  10.  
  11. static char RCSId[]="$Id: ContourSeriesPane.m,v 1.2 1993/05/04 16:21:27 davis Exp $";
  12.  
  13. #import <appkit/Application.h>
  14. #import <appkit/Form.h>
  15. #import <appkit/FormCell.h>
  16.  
  17. #import "ContourSeriesPane.h"
  18. #import "Status.h"
  19. #import "StatusContour.h"
  20.  
  21.  
  22. @implementation ContourSeriesPane
  23.  
  24. - init
  25. {
  26.     [super init];
  27.  
  28.     [NXApp loadNibSection: "ContourSeriesPane.nib"
  29.             owner: self
  30.         withNames: NO
  31.          fromZone: [self zone]];
  32.  
  33.     return self;
  34. }
  35.  
  36.  
  37. - (BOOL)updateStatus:aStatus doc:aDoc
  38. {
  39.     BOOL    enabled;
  40.  
  41.     [super updateStatus:aStatus doc:aDoc];
  42.  
  43.     if (status) {
  44.     [startField setDoubleValue:[status contourLevelsStart]];
  45.     [incrField setDoubleValue:[status contourLevelsIncr]];
  46.     [endField setDoubleValue:[status contourLevelsEnd]];
  47.     [levelsFormCell setIntValue:[status contourLevels]];
  48.     }
  49.  
  50.     enabled = [doc isEnabled];            /* doc is ContourOptionsPanel*/
  51.     [levelsForm setEnabled:enabled];
  52.     [seriesMatrix setEnabled:enabled];
  53.  
  54.     return NO;
  55. }
  56.  
  57.  
  58. - selectControl:sender
  59. {
  60.     [seriesMatrix selectText:self];
  61.     return self;
  62. }
  63.  
  64.  
  65. - setStart:sender
  66. {
  67.     [status setContourLevelsStart:[sender doubleValue]];
  68.     [self forceUpdateStatus:status doc:doc];    /* This may change levels */
  69.     return self;
  70. }
  71.  
  72.  
  73. - setIncr:sender
  74. {
  75.     [status setContourLevelsIncr:[sender doubleValue]];
  76.     [self forceUpdateStatus:status doc:doc];    /* This may change levels */
  77.     return self;
  78. }
  79.  
  80.  
  81. - setEnd:sender
  82. {
  83.     [status setContourLevelsEnd:[sender doubleValue]];
  84.     [self forceUpdateStatus:status doc:doc];    /* This may change levels */
  85.     return self;
  86. }
  87.  
  88.  
  89.  
  90. - setLevels:sender
  91. {
  92.     [status setContourLevels:[sender intValue]];
  93.     [self forceUpdateStatus:status doc:doc];    /* This may change series */
  94.     return self;
  95. }
  96.  
  97.  
  98. // Shuts up the compiler about unused RCSId
  99. - (const char *) rcsid
  100. {
  101.     return RCSId;
  102. }
  103.  
  104.  
  105. @end
  106.